#pragma once
#include "test_base.h"
#include <boost/lockfree/queue.hpp>
#include <random>
#include <functional>

class queue_test : public test_base
{
public:
	queue_test(long loops, bool force_context_switch) :test_base(loops, force_context_switch),
							_input_gen(std::bind(std::uniform_int_distribution<int>(0, loops), std::mt19937()))
	{}

	virtual ~queue_test(){}

	virtual std::string test_name(void) override;

protected:
	virtual void test_init() override;
	virtual void do_test() override;

private:
	std::function<int()>							_input_gen;
	static __declspec(thread) int					_random_toll;
	std::unique_ptr<boost::lockfree::queue<int>>	_queue;
};

